﻿namespace FlashcardPdfCreator
{
	public class CsvStreamReaderCardData : CardData
	{
		public CsvStreamReaderCardData(CsvRow row)
		{
			this.Word = row[0];
			
			if (row.Count > 1)
			{
				this.Pronunciation = row[1];

				if (row.Count > 2)
				{
					this.Example = row[2];

					if (row.Count > 3)
					{
						this.Meaning = row[3];

						if (row.Count > 4)
							this.ExampleTranslation = row[4];
						else
							this.ExampleTranslation = string.Empty;
					}
				}
			}
		}
	}
}
